import request from '@/utils/request'

// 查询客户联系人列表
export function listCustomerLinkmane(query) {
  return request({
    url: '/customer/customerLinkmane/list',
    method: 'get',
    params: query
  })
}

//获取所有联系人信息
export function listCustomerLinkmaneAll() {
  return request({
    url: '/customer/customerLinkmane/all',
    method: 'get',
  })
}

// 查询客户联系人详细
export function getCustomerLinkmane(id) {
  return request({
    url: '/customer/customerLinkmane/' + id,
    method: 'get'
  })
}

// 基于客户Id查询客户联系人详细
export function customerLinkmaneByCustomerId(customerId) {
  return request({
    url: '/customer/customerLinkmane/byCustomerId/' + customerId,
    method: 'get'

  })
}

// 新增客户联系人
export function addCustomerLinkmane(data) {
  return request({
    url: '/customer/customerLinkmane',
    method: 'post',
    data: data
  })
}

// 修改客户联系人
export function updateCustomerLinkmane(data) {
  return request({
    url: '/customer/customerLinkmane',
    method: 'put',
    data: data
  })
}

// 删除客户联系人
export function delCustomerLinkmane(id) {
  return request({
    url: '/customer/customerLinkmane/' + id,
    method: 'delete'
  })
}
